<?php $server=explode("/index.php", $_SERVER['PHP_SELF']);?>


<div style="width:100%;height:50px;">
<div id="toolbar" class="toolbar"><table class="toolbar"><tbody><tr>
<td><a href="#" onclick="saveAction(); ">
<span style="background-image: url(<?php echo $server[0];?>/images/t_cmd_save.png);"></span>
Lưu</a></td>

<td><a href="#" onclick="cancelAction('/CMS_ITGVN_NEW/admin/product/index')">
<span style="background-image: url(<?php echo $server[0];?>/images/t_cmd_cancel.png);"></span>
Hủy</a></td>
</tr></tbody></table>
</div>
</div>


<form action="" method="post" enctype="multipart/form-data" name="adminForm">
<table class="adminform" cellpadding="10px">

<tr>
<td>Product Name</td>
<td><input type="text"" name="productName" size="70" value="<?php echo $this->escape($this->product['productName']);?>">
<br><?php echo $this->errorList["productName"];?>
</td>

<td>Image:</td><td><input type="file" size="30" name="imageURL">
<br><?php echo $this->errorList["imageURL"];?>
</td>
</tr>

<tr>
<td rowspan="2">Sumary</td>
<td rowspan="2"><textarea rows="5" cols="50" name="summary"><?php echo $this->escape($this->product["summary"]);?></textarea> 
<br><?php echo $this->errorList["summary"];?>
</td>


<td>Publish</td>
<td><?php if( isset($this->product["status"]) && $this->product["status"] == 0){
?>
<input type="radio" name="status" value="0" checked="checked">No
<input type="radio" name="status" value="1" >Yes
<?php } 
else{?>
<input type="radio" name="status" value="0">No
<input type="radio" name="status" value="1" checked="checked">Yes
<?php } ?>
</td>
</tr>

<tr>
<td>Product Category</td>
<td>
<?php echo $this->formSelect('categoryId',$this->product['categoryId'],null,$this->categoryList);?>
<br><?php echo $this->errorList["categoryId"];?>
</td></tr>

</table>
<script type="text/javascript">
initMCE("description");
</script>
<table class="adminform">
<tr><td>
<textarea id="description" name="description" rows="15" cols="80" style="width: 80%">
<?php echo $this->product["description"];?>
</textarea>
<br><?php echo $this->errorList["description"];?>
</td></tr>
</table>

<!-- end admin form input -->

<input type="hidden" name="cmd" id="cmd">
<input type="hidden" name="productId" value="<?php echo $this->product['productId'];?>">
<input type="hidden" name="ordering" value="<?php echo $this->product['ordering'];?>">
<input type="hidden" name="createdBy" value="<?php echo $this->product['createdBy'];?>">
<input type="hidden" name="creationTime" value="<?php echo $this->product['creationTime'];?>">
</form>

<div>
<a href="<?php
$temp=explode("/index.php", $_SERVER['PHP_SELF']); echo $temp[0];?>/admin/product/index">Return Product Index</a>
</div>